package com.rabbit.springrabbitmq.producer.returns;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

/**
 * @Author: JohnCoding
 * @Description:
 * @date: 2020/8/7 22:17
 */
@Component
public class ReturnCallBack implements RabbitTemplate.ReturnCallback {

    @Override
    public void returnedMessage(Message message, int replyCode, String replyText,
                                String exchange, String routingKey) {
        System.out.println("-----ReturnCallBack----");
        System.out.println("Message === " + message);
        System.out.println("replyCode === "+ replyCode);
        System.out.println("replyText === "+ replyText);
        System.out.println("exchange === "+ exchange);
        System.out.println("routingKey == "+ routingKey);
    }

}

